package com.example.vehiclemanagesystem.service.Impl;

import com.example.vehiclemanagesystem.dao.VehicleDao;
import com.example.vehiclemanagesystem.entity.Vehicle;
import com.example.vehiclemanagesystem.service.VehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VehicleServiceImpl implements VehicleService {
    @Autowired
    private VehicleDao vehicleDao;
    @Override
    public Vehicle selectVehicleByVehicleID(Integer v_id){
        return vehicleDao.selectVehicleByVehicleID(v_id);
    }
    @Override
    public void addNewVehicle(Vehicle vehicle){
        vehicleDao.addNewVehicle(vehicle);
    }
    @Override
    public void updateVehicle(Vehicle vehicle){
        vehicleDao.updateVehicle(vehicle);
    }
    @Override
    public void deleteVehicle(Vehicle vehicle){
        vehicleDao.deleteVehicle(vehicle);
    }
    @Override
    public List<Vehicle> allVehicle() {
        return vehicleDao.allVehicle();
    }

    @Override
    public int countVehicle() {
        return vehicleDao.countVehicle();
    }

}
